% fname: routing_xy__topology_8x8__.m
% ./noxim -routing xy -dimx 8 -dimy 8  -sim 10000 -warmup 2000 -size 8 8 -buffer 8 -hs 27 0.2 -hs 28 0.2 -hs 35 0.2 -hs 36 0.2 

function [max_pir, max_throughput, min_delay] = routing_xy__topology_8x8__(symbol)

data = [
%             pir      avg_delay     throughput      max_delay       rpackets         rflits
           0.0022        19.7011      0.0184746            164           1181           9459
           0.0022        19.3084      0.0187601            222           1164           9305
           0.0022        20.0451      0.0176032            110           1109           8872
           0.0022        18.9222      0.0173552            111           1093           8747
           0.0022        20.3119      0.0187302            125           1180           9440
           0.0022        18.0976      0.0183266             88           1137           9090
           0.0022        17.3749      0.0178274            106           1123           8985
           0.0022         18.803      0.0175156             98           1122           8968
           0.0022        18.3554      0.0185553             79           1134           9055
           0.0022        17.9648      0.0171389            116           1080           8638
           0.0022        19.6823      0.0179087             93           1127           9026
           0.0022        17.3817       0.018291             95           1116           8926
           0.0022        18.5632      0.0178301            102           1140           9129
           0.0022        20.4613      0.0179173            155           1110           8887
           0.0022        20.0441      0.0183413             92           1156           9244
           0.0022        19.1231      0.0177917            119           1121           8967
           0.0022        18.9748      0.0176806             98           1113           8911
           0.0022        19.0731      0.0183044            107           1135           9079
           0.0022        18.5414      0.0175444            143           1088           8702
           0.0022        18.4491      0.0178972            116           1109           8877
           0.0023        18.7331       0.018666            135           1195           9557
           0.0023        20.3102      0.0196289            143           1254          10050
           0.0023        20.7934      0.0188457            157           1205           9649
           0.0023        19.8679      0.0184531            144           1181           9448
           0.0023        18.9598      0.0199146            102           1194           9559
           0.0023        19.9433      0.0181973            139           1164           9317
           0.0023        20.2176      0.0188849            119           1190           9518
           0.0023        19.8505      0.0192578             99           1231           9860
           0.0023        21.2695      0.0189504            184           1195           9551
           0.0023        20.1777      0.0180575            123           1137           9101
           0.0023        19.8085      0.0186129            105           1154           9232
           0.0023         18.933      0.0182964            127           1135           9075
           0.0023        19.1809      0.0178711             98           1144           9150
           0.0023        21.2264      0.0190867            159           1184           9467
           0.0023        19.1088      0.0181052            125           1140           9125
           0.0023        19.7615      0.0193607            227           1178           9448
           0.0023        20.3982      0.0193353            150           1218           9745
           0.0023        22.3362      0.0180547            224           1157           9244
           0.0023        19.5339      0.0189206            128           1193           9536
           0.0023        18.9215      0.0178906            108           1146           9160
           0.0024        22.2409      0.0201687            149           1270          10165
           0.0024        19.6438      0.0197381            112           1241           9948
           0.0024          19.88      0.0191367            241           1225           9798
           0.0024        20.3299      0.0204435            130           1267          10140
           0.0024        20.5547      0.0189941            136           1215           9725
           0.0024        21.1065      0.0204063            170           1305          10448
           0.0024        20.2591      0.0188867            185           1208           9670
           0.0024        20.5658      0.0191094            168           1223           9784
           0.0024        22.5406      0.0201329            165           1269          10147
           0.0024        19.3579      0.0189082            111           1210           9681
           0.0024        21.1522      0.0199214            130           1235           9881
           0.0024         22.913       0.019873            174           1253          10016
           0.0024        19.6582      0.0196699            125           1258          10071
           0.0024        21.0765      0.0200234            166           1281          10252
           0.0024        21.9669      0.0196627            152           1237           9910
           0.0024        20.6921      0.0192383            100           1231           9850
           0.0024        24.1248      0.0209536            288           1298          10393
           0.0024        21.6383      0.0185605            138           1186           9503
           0.0024        21.1745      0.0196587            212           1238           9908
           0.0024        21.4491      0.0202579            182           1276          10210
           0.0025        25.4628      0.0219385            191           1383          11057
           0.0025        21.0807      0.0195527            113           1252          10011
           0.0025        20.4779         0.0205            120           1291          10332
           0.0025         24.175      0.0204107            224           1286          10287
           0.0025        22.1873      0.0199008            184           1255          10030
           0.0025        21.5608      0.0203448            152           1259          10091
           0.0025        22.6021      0.0207679            150           1307          10467
           0.0025        21.4773      0.0198952            236           1234           9868
           0.0025        21.8157      0.0204297            147           1308          10460
           0.0025        26.5093      0.0208145            262           1290          10324
           0.0025        23.0287      0.0207051            165           1325          10601
           0.0025        22.3774      0.0200655            181           1264          10113
           0.0025        20.8592      0.0196367            133           1257          10054
           0.0025        22.0557      0.0207422            128           1328          10620
           0.0025        20.5067      0.0200357            204           1263          10098
           0.0025        21.3829      0.0202798            182           1277          10221
           0.0025        23.2976      0.0201647            216           1270          10163
           0.0025        20.8732      0.0205859            134           1317          10540
           0.0025        24.3177      0.0210181            178           1303          10425
           0.0025        21.5974      0.0198631            177           1252          10011
           0.0026        21.5069      0.0204082            129           1306          10449
           0.0026        23.9389      0.0209824            154           1343          10743
           0.0026        23.8643      0.0227056            176           1408          11262
           0.0026        21.0165      0.0202698            132           1276          10216
           0.0026        26.0753      0.0211621            187           1354          10835
           0.0026        23.5825      0.0214102            198           1370          10962
           0.0026        21.1775      0.0204434            128           1307          10467
           0.0026        24.0328       0.021631            183           1340          10729
           0.0026        25.1398      0.0221129            179           1373          10968
           0.0026        21.8895      0.0199297            120           1276          10204
           0.0026        22.2698      0.0199206            242           1253          10040
           0.0026        24.6447      0.0222988            221           1427          11417
           0.0026        21.7063      0.0208789            114           1338          10690
           0.0026        21.0024      0.0201091            128           1267          10135
           0.0026        24.1202      0.0221055            153           1414          11318
           0.0026        23.7476      0.0216052            179           1363          10889
           0.0026        21.8894      0.0206089            126           1275          10222
           0.0026        21.3447      0.0204544            141           1288          10309
           0.0026        22.3545       0.020627            170           1320          10561
           0.0026        24.4792      0.0220972            214           1392          11137
           0.0027        23.7955      0.0219657            217           1364          10895
           0.0027        22.5254      0.0205684            129           1317          10531
           0.0027        23.8801      0.0220117            131           1409          11270
           0.0027        22.2398      0.0209921            236           1322          10580
           0.0027        21.1329      0.0218831            172           1354          10854
           0.0027        24.4229      0.0224303            280           1369          10946
           0.0027        22.3749      0.0214297            124           1371          10972
           0.0027        23.7615      0.0220615            341           1388          11119
           0.0027        26.1502      0.0226111            152           1425          11396
           0.0027        21.1187      0.0214107            138           1348          10791
           0.0027        22.3032      0.0205508            142           1316          10522
           0.0027        23.8738      0.0220547            158           1410          11292
           0.0027        22.8933      0.0214345            167           1350          10803
           0.0027         23.416      0.0228347            139           1416          11326
           0.0027        25.2939      0.0220391            227           1412          11284
           0.0027        23.4196      0.0217024            148           1368          10938
           0.0027        23.7889      0.0217793            222           1393          11151
           0.0027        27.1521      0.0210859            327           1348          10796
           0.0027        25.6591      0.0223849            199           1408          11282
           0.0027        24.7087      0.0220371            165           1411          11283
           0.0028         26.785      0.0236786            318           1493          11934
           0.0028          23.66      0.0218672            182           1400          11196
           0.0028        22.9826      0.0224004            156           1434          11469
           0.0028         32.009      0.0233992            501           1451          11606
           0.0028        31.3584      0.0223651            299           1409          11272
           0.0028        23.9726      0.0220417            133           1388          11109
           0.0028        28.6478      0.0225099            322           1417          11345
           0.0028        23.0301      0.0217793            141           1395          11151
           0.0028        24.4693      0.0214102            273           1370          10962
           0.0028        28.1189      0.0230234            303           1472          11788
           0.0028        24.2533      0.0225615            269           1421          11371
           0.0028        22.6014      0.0222004            125           1400          11189
           0.0028        28.7823      0.0244098            214           1488          11912
           0.0028        23.4172      0.0221543            192           1419          11343
           0.0028        25.7786      0.0224385            272           1414          11309
           0.0028        24.4252      0.0220417            191           1390          11109
           0.0028        24.0753      0.0214901            185           1354          10831
           0.0028        27.6124      0.0234297            215           1499          11996
           0.0028        24.9019      0.0226426            168           1448          11593
           0.0028        25.0057      0.0222123            153           1399          11195
           0.0029        29.1332      0.0233398            195           1494          11950
           0.0029        25.5274       0.024543            149           1496          11977
           0.0029        27.3876      0.0228555            206           1463          11702
           0.0029        25.4348       0.023381            154           1449          11597
           0.0029        33.3135      0.0245556            285           1547          12376
           0.0029        28.4879      0.0238379            195           1525          12205
           0.0029        26.9438      0.0242817            213           1529          12238
           0.0029        25.6927      0.0240605            168           1539          12319
           0.0029        23.7298       0.023756            173           1473          11783
           0.0029        23.2657      0.0232031            141           1483          11880
           0.0029        28.9138      0.0241151            290           1519          12154
           0.0029        29.1263      0.0230312            233           1473          11792
           0.0029        28.5308      0.0250225            161           1524          12211
           0.0029        22.7287      0.0222903            251           1382          11056
           0.0029        27.0497      0.0242738            151           1530          12234
           0.0029        24.4218      0.0226468            183           1425          11414
           0.0029         28.878      0.0235645            232           1508          12065
           0.0029         25.163      0.0231607            200           1460          11673
           0.0029        29.9013      0.0237246            278           1519          12147
           0.0029        35.0789      0.0243242            524           1558          12454
            0.003        27.5655      0.0234824            293           1503          12023
            0.003        30.2843      0.0236797            304           1516          12124
            0.003        31.0408      0.0252758            258           1593          12739
            0.003        25.2948      0.0236448            150           1489          11917
            0.003        29.0064       0.024619            225           1551          12408
            0.003        39.2487      0.0248594            459           1592          12728
            0.003        32.0868      0.0246964            364           1556          12447
            0.003        29.0863      0.0233496            228           1494          11955
            0.003        27.2998      0.0231367            260           1481          11846
            0.003        32.3113      0.0251172            274           1606          12860
            0.003         29.296      0.0235293            305           1507          12047
            0.003        30.3441       0.024494            235           1543          12345
            0.003        27.7639      0.0236543            182           1512          12111
            0.003        26.5683      0.0239004            178           1531          12237
            0.003        28.9687      0.0239922            270           1535          12284
            0.003        34.4701      0.0245293            532           1570          12559
            0.003        32.6973      0.0251191            396           1609          12861
            0.003        29.1214      0.0237738            386           1499          11982
            0.003        27.0458       0.024621            196           1527          12212
            0.003        31.8613      0.0248234            340           1565          12511
           0.0031        36.3096      0.0256111            305           1615          12908
           0.0031        28.9789      0.0243945            371           1561          12490
           0.0031        31.0512      0.0240859            258           1543          12332
           0.0031        29.0924      0.0245078            312           1569          12548
           0.0031         27.066      0.0242077            229           1501          12007
           0.0031        25.3248      0.0238477            181           1524          12210
           0.0031        33.1638      0.0247988            305           1587          12697
           0.0031        33.6149      0.0248789            410           1592          12738
           0.0031        30.9535      0.0242168            274           1550          12399
           0.0031        26.8468       0.023541            201           1508          12053
           0.0031        29.1978      0.0248016            174           1562          12500
           0.0031        31.3287       0.024877            222           1567          12538
           0.0031         33.042      0.0245684            264           1572          12579
           0.0031         40.491      0.0252598            809           1615          12933
           0.0031        26.4968      0.0242793            295           1552          12431
           0.0031        34.9231      0.0247578            291           1586          12676
           0.0031        38.3669      0.0255675            568           1611          12886
           0.0031        31.7718      0.0250488            225           1604          12825
           0.0031        35.7745      0.0257168            340           1645          13167
           0.0031        31.8227      0.0245456            266           1545          12371
           0.0032        34.5253      0.0258691            249           1658          13245
           0.0032        26.4794      0.0246647            280           1554          12431
           0.0032        38.9643      0.0257837            392           1625          12995
           0.0032        30.2592      0.0255332            245           1632          13073
           0.0032        29.2676      0.0253418            318           1622          12975
           0.0032        30.4408      0.0254883            230           1631          13050
           0.0032        31.6621      0.0251543            333           1610          12879
           0.0032        36.2407      0.0259004            358           1658          13261
           0.0032        35.1911      0.0251992            267           1612          12902
           0.0032        32.8041      0.0254563            356           1603          12830
           0.0032        34.2706      0.0262246            320           1678          13427
           0.0032        39.2401      0.0263611            383           1662          13286
           0.0032        32.9938      0.0252266            377           1614          12916
           0.0032        27.1203      0.0246953            200           1580          12644
           0.0032        34.8294      0.0261113            270           1671          13369
           0.0032        37.4797      0.0261429            406           1647          13176
           0.0032        31.5698         0.0255            265           1634          13056
           0.0032        35.6212      0.0254492            313           1629          13030
           0.0032        30.7389      0.0254762            377           1605          12840
           0.0032        35.8215      0.0247695            376           1585          12682
           0.0033        38.0761      0.0262539            369           1681          13442
           0.0033        47.6467      0.0273516           1469           1749          14004
           0.0033        34.9809      0.0265754            346           1674          13394
           0.0033        42.0752      0.0262227            453           1676          13426
           0.0033        39.0647      0.0260723            482           1668          13349
           0.0033        32.2248      0.0253613            369           1624          12985
           0.0033         51.042      0.0268027            707           1716          13723
           0.0033        35.0254      0.0258691            452           1655          13245
           0.0033        36.3037      0.0263613            314           1686          13497
           0.0033        42.1151      0.0274385            360           1729          13829
           0.0033        37.4924      0.0268066            315           1716          13725
           0.0033        51.9147      0.0271726           1062           1712          13695
           0.0033        39.3416      0.0257969            306           1651          13208
           0.0033        40.2937      0.0268145            359           1716          13729
           0.0033        32.5364      0.0264434            298           1691          13539
           0.0033        39.2162      0.0267031            371           1707          13672
           0.0033        43.2317      0.0266855            356           1709          13663
           0.0033        32.7292      0.0259102            254           1658          13266
           0.0033        37.3464      0.0275332            232           1761          14097
           0.0033        38.1215      0.0268809            389           1720          13763
           0.0034        53.9146      0.0272344            944           1744          13944
           0.0034        43.1181      0.0275813            727           1736          13901
           0.0034        41.0486      0.0273047            306           1748          13980
           0.0034        45.9162      0.0282262            381           1778          14226
           0.0034        39.5711      0.0275879            334           1765          14125
           0.0034        39.4811       0.028168            934           1802          14422
           0.0034        44.5756      0.0267441            605           1713          13693
           0.0034        42.5282      0.0276875            278           1772          14176
           0.0034        45.9619      0.0266426            447           1707          13641
           0.0034        48.4529      0.0272187            635           1740          13936
           0.0034         48.886      0.0273906            902           1754          14024
           0.0034        34.4523      0.0270703            250           1731          13860
           0.0034        44.7145      0.0270293            929           1730          13839
           0.0034        37.3366      0.0269746            293           1726          13811
           0.0034        40.1152      0.0268477            543           1719          13746
           0.0034        40.8015      0.0267695            551           1713          13706
           0.0034        43.3392      0.0275469            457           1763          14104
           0.0034        42.4615      0.0263789            459           1688          13506
           0.0034        53.5456      0.0296429            697           1866          14940
           0.0034        36.9803      0.0269414            249           1724          13794
           0.0035        52.7499      0.0285137            573           1823          14599
           0.0035        59.1279      0.0278242            837           1782          14246
           0.0035        58.7675      0.0267949           1153           1716          13719
           0.0035        49.9905      0.0279961            420           1792          14334
           0.0035        89.4881      0.0295469           2166           1891          15128
           0.0035        36.3153      0.0279707            281           1792          14321
           0.0035        56.5098       0.028791            599           1842          14741
           0.0035        69.9609      0.0284187            990           1791          14323
           0.0035        45.2241       0.028041            507           1794          14357
           0.0035        48.9196      0.0279941            629           1790          14333
           0.0035        46.4716      0.0283574            431           1815          14519
           0.0035        43.9345       0.027881            433           1755          14052
           0.0035        42.5827      0.0278254            603           1754          14024
           0.0035        37.6875      0.0277734            403           1776          14220
           0.0035        40.8212      0.0277798            384           1751          14001
           0.0035        41.3837       0.027627            283           1767          14145
           0.0035        84.1028      0.0281191           2112           1799          14397
           0.0035        49.8677      0.0279863            580           1792          14329
           0.0035        43.2455      0.0286328            393           1833          14660
           0.0035        55.7889       0.028041            736           1795          14357
           0.0036        44.3686      0.0283574            570           1815          14519
           0.0036        90.4584      0.0292793           2330           1874          14991
           0.0036        54.4395      0.0300703            719           1925          15396
           0.0036        44.7041       0.029041            301           1859          14869
           0.0036        63.3229      0.0289325            666           1824          14582
           0.0036        76.4927      0.0289551           1263           1853          14825
           0.0036        46.5537      0.0292837            434           1844          14759
           0.0036        54.3384      0.0287852            440           1841          14738
           0.0036        57.4586      0.0286641            582           1834          14676
           0.0036        53.2786      0.0280039            868           1791          14338
           0.0036        50.4101      0.0297734            478           1907          15244
           0.0036        53.5396      0.0295898            970           1894          15150
           0.0036        61.6411      0.0282813           1506           1811          14480
           0.0036        65.6473      0.0290078            867           1857          14852
           0.0036         87.228      0.0292559           1525           1873          14979
           0.0036        66.2819      0.0291719            964           1866          14936
           0.0036        51.7307       0.027668            859           1771          14166
           0.0036        59.4625      0.0294102            838           1881          15058
           0.0036        75.4816        0.02925            756           1871          14976
           0.0036        81.0625      0.0290352           1291           1857          14866
           0.0037        82.6117      0.0292949           1165           1875          14999
           0.0037        67.6154      0.0294473           1493           1885          15077
           0.0037        65.0005      0.0296348            648           1893          15173
           0.0037        58.9069      0.0292012            485           1869          14951
           0.0037        204.222      0.0307734           5069           1971          15756
           0.0037        75.7935      0.0292051            770           1869          14953
           0.0037        42.4603      0.0287188            398           1838          14704
           0.0037        71.4154      0.0298477            780           1909          15282
           0.0037        50.5058      0.0298086            487           1908          15262
           0.0037        59.8213      0.0294206            670           1852          14828
           0.0037        95.9209      0.0308008           2001           1972          15770
           0.0037        61.4352      0.0287168           1345           1836          14703
           0.0037        81.8998      0.0296389           1662           1866          14938
           0.0037        66.8131      0.0301875           1345           1932          15456
           0.0037        108.257      0.0299551           1611           1918          15337
           0.0037        48.1129      0.0285039            563           1824          14594
           0.0037        38.9158      0.0278438            417           1782          14256
           0.0037        69.4321      0.0294629           1170           1886          15085
           0.0037        93.6726      0.0298574           1292           1909          15287
           0.0037        92.0909      0.0293906           1858           1881          15048
           0.0038        232.006      0.0302402           5479           1936          15483
           0.0038        105.286      0.0300117           1916           1921          15366
           0.0038        147.594      0.0311925           3151           1965          15721
           0.0038        140.032      0.0303457           2097           1941          15537
           0.0038        61.5591      0.0294663            928           1853          14851
           0.0038        107.915      0.0299844           1584           1920          15352
           0.0038        51.8898      0.0299121            706           1915          15315
           0.0038          65.32      0.0309023            816           1978          15822
           0.0038        113.799      0.0303254           1781           1911          15284
           0.0038        94.9943      0.0300312           1407           1921          15376
           0.0038        92.1861      0.0299941           1782           1918          15357
           0.0038        286.765      0.0303633           4374           1944          15546
           0.0038        96.3298      0.0305645           1514           1956          15649
           0.0038        139.002       0.029998           2493           1921          15359
           0.0038        67.0845      0.0299531           1183           1917          15336
           0.0038        60.5872      0.0297793            978           1904          15247
           0.0038        63.6763      0.0303242            712           1940          15526
           0.0038         72.186      0.0306348           1005           1962          15685
           0.0038         79.047      0.0296445           1838           1895          15178
           0.0038        109.515       0.029959           2555           1915          15339
           0.0039        91.8387      0.0296582           1352           1897          15185
           0.0039        99.5718      0.0307242           1904           1936          15485
           0.0039        121.694      0.0310898           2512           1990          15918
           0.0039        102.114       0.030754           1772           1938          15500
           0.0039        110.998      0.0304961           2241           1951          15614
           0.0039         93.665      0.0307988           1961           1970          15769
           0.0039        95.5124      0.0301074           1433           1928          15415
           0.0039        114.238      0.0317207           1650           2030          16241
           0.0039         68.791      0.0305859            624           1957          15660
           0.0039        103.077      0.0314863           1288           2015          16121
           0.0039        88.8368      0.0311953           1208           1997          15972
           0.0039        128.248      0.0309707           1675           1983          15857
           0.0039         136.45      0.0316152           2100           2024          16187
           0.0039        116.399      0.0311445           2669           1994          15946
           0.0039        249.002      0.0308164           3180           1971          15778
           0.0039        65.1547      0.0299902            868           1920          15355
           0.0039        87.1923      0.0300156            818           1919          15368
           0.0039        74.6567      0.0307344            789           1966          15736
           0.0039        170.065       0.031373           2458           2009          16063
           0.0039        110.646      0.0313672           2017           2009          16060
            0.004        134.895       0.031291           3500           2003          16021
            0.004        233.198      0.0304258           5048           1946          15578
            0.004        145.409      0.0305117           3895           1954          15622
            0.004        107.068      0.0315625           2768           2020          16160
            0.004        256.258      0.0322421           4767           2032          16250
            0.004        251.905      0.0304805           5629           1951          15606
            0.004        316.468      0.0323047           6892           2068          16540
            0.004        219.695      0.0309277           3683           1981          15835
            0.004        135.251      0.0327242           1773           2060          16493
            0.004        183.122      0.0319121           3977           2042          16339
            0.004        145.958      0.0313945           2603           2008          16074
            0.004        115.464      0.0306905           2820           1935          15468
            0.004        166.584      0.0309121           3375           1978          15827
            0.004        233.184      0.0309199           5189           1980          15831
            0.004        120.282       0.031293           1845           2002          16022
            0.004        207.873      0.0315664           5638           2022          16162
            0.004         184.94      0.0306465           4601           1961          15691
            0.004        268.592      0.0304043           5688           1946          15567
            0.004        117.717      0.0306191           1478           1959          15677
            0.004        273.857      0.0303359           5354           1943          15532
];

rows = size(data, 1);
cols = size(data, 2);

data_delay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+1);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_delay = [data_delay; data(ifirst, 1:cols-5), avg ci];
end

figure(1);
hold on;
plot(data_delay(:,1), data_delay(:,2), symbol);

data_throughput = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+2);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_throughput = [data_throughput; data(ifirst, 1:cols-5), avg ci];
end

figure(2);
hold on;
plot(data_throughput(:,1), data_throughput(:,2), symbol);

data_maxdelay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+3);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_maxdelay = [data_maxdelay; data(ifirst, 1:cols-5), avg ci];
end

figure(3);
hold on;
plot(data_maxdelay(:,1), data_maxdelay(:,2), symbol);


%-------- Saturation Analysis -----------
slope=[];
for i=2:size(data_throughput,1),
    slope(i-1) = (data_throughput(i,2)-data_throughput(i-1,2))/(data_throughput(i,1)-data_throughput(i-1,1));
end

for i=2:size(slope,2),
    if slope(i) < (0.95*mean(slope(1:i)))
        max_pir = data_throughput(i, 1);
        max_throughput = data_throughput(i, 2);
        min_delay = data_delay(i, 2);
        break;
    end
end
